<!--工具栏部分-->

<script src="../js/mod/cookie.js" type="text/javascript" charset="utf-8"></script>
<div class="browsehappy" style="display: none;">你的浏览器实在<strong>太太旧了</strong>，为了你账号的安全，升级完浏览器再说 <a target="_blank" href="http://browsehappy.osfipin.com/">立即升级</a></div>
<div class="header-bar clearfix">
	<div class="wrap">
		<div class="header-login fl">
			<span class="mod-meta">Hello，欢迎来到轻松结婚网！</span>
			<a href="login.html" class="log-reg"><span class="mod-hightlight">登录</span></a>
			<a href="register.html" class="log-reg"><span class="mod-hightlight">注册</span></a>
			<a href="personal-shemher.html" class="welcome" style="display: none;"><span class="mod-hightlight">欢迎你...用户</span></a>
			<a href="javascript:void(0);" class="quit" style="display: none;"><span class="mod-hightlight">退出登录</span></a>
		</div>
		<div class="header-tool fr">
			<!--<a href=""><span>我的日志</span>|</a>-->
			<a href="javascript:void(0);" id="grzx"><span>个人中心</span>|</a>
			<a href="javascript:void(0);"><span>小工具<i class="top-icon mod-sprites"></i></span></a>
		</div>
	</div>
</div>
<!--新年专题页面-->
<div class="header-year">
	<img src="../img/year/head-year.png"/>
</div>
<!--搜索部分-->
<div class="search  clearfix">
	<div class="wrap">
		<div class="search-logo fl mt30">
			<a href="home.html" class="mod-sprites" title="logo点击跳转首页" alt="logo点击跳转首页">
				<!--<img src="../img/static/shemher-logo.png" alt="相合网logo" title="相合网logo" />-->
			</a>
		</div>
		<div class="search-word fl">
			<div class="search-word-top">
				<input type="text" name="search-key" id="search-key" value="" maxlength="36" />
				<input type="button" name="search-btn" id="search-btn" value="搜索" class="search-btn"></input>
			</div>
			<div class="search-word-bottom mt5">
				<span class="mod-meta">热门搜索:</span>
				<a href="javascript:void(0)">轻松结婚 </a>
				<a href="javascript:void(0)">婚礼套餐 </a>
				<a href="javascript:void(0)">婚纱照 </a>
				<a href="javascript:void(0)">定制婚礼 </a>
			</div>
		</div>
		<div class="search-exc fl">
			<a href="" class="mod-hightlight">获取你的专属优惠</a>
		</div>
	</div>
</div>
<!--导航-->
<div class="header-nav wrap">
	<ul class="clearfix">
		<li>
			<a href="planpackage_list.html"><i class="mod-sprites hlch"></i>婚礼策划</a>
		</li>
		<li>
			<a href="photography_list.html"><i class="mod-sprites hscy"></i>婚纱摄影</a>
		</li>
		<li>
			<a href="hotel_list.html"><i class="mod-sprites jdyd"></i>酒店预定</a>
		</li>
		
		<li>
			<a href="honeymoon_list.html"><i class="mod-sprites mylx"></i>蜜月旅行</a>
		</li>
		<li>
			<a href="journal_list.html"><i class="mod-sprites xlrz"></i>新娘日志</a>
		</li>
		<li>
			<a href="articles_list.html"><i class="mod-sprites xlyp"></i>婚礼用品</a>
		</li>
	</ul>
</div>
<script type="text/javascript">
	var nowUrl = window.location.href;
	var liList = $(".header-nav ul li");
	var sloact =["plan","photography","hotel","honeymoon","journal","articles"];
	
	for (var i =0;i<sloact.length;i++) {
		if(nowUrl.indexOf(sloact[i])>-1)
		liList.eq(i).addClass("active");
	}
	if(nowUrl.indexOf("personal")>-1||nowUrl.indexOf("about-our")>-1){
	  $(".header-nav").remove();	
	}
	
	/*有cookie*/
	if(getCookie("username")){
		$(".log-reg").hide();
		$(".quit").show();
		$(".welcome").show().children(".mod-hightlight").text("欢迎    "+getCookie("username"));
	}
	
	/*没有有cookie*/
	$(".quit").click(function(){
		if(confirm("确定要退出登录吗？"))
		{
			delCookie("username");
			//console.log(document.cookie);
			window.location.href="home.html";
			$(".log-reg").show();
			$(".quit").hide();
			$(".welcome").hide();
		}
	});
	
	$("#grzx").click(function(){
		//$("personal-shemher")
		if(getCookie("username")&&getCookie("users")){
		window.location.href ="personal-shemher.html";
		}else{
			alert("你还没有登录呢");
		}
	})
</script>
<script type="text/javascript">
	//delCookie("year");
	$("head").append('<link rel="stylesheet" type="text/css" href="../css/page/year.css"/>');
	if(!getCookie("year"))
	{
		/*加入新年专题页面*/
		$(".header-year").append('<div class="fix"><div class="year2018"><img src="../img/year/year-img.png"/></div><div class="fu"></div></div>');
		setCookie("year","open","1h");//设置cookie1h运行一次
		var funum=0;
		var myYear = setInterval(function(){
			if(funum<=150)
			{
				var left=Math.ceil(Math.random()*100);
				var width=Math.ceil(Math.random()*60)+60;
				var time=Math.ceil(Math.random()*3)+1;
				var dom=$('<div class="box"><img src="../img/year/fu.png"/></div>')
				dom.css({"left":left+"%",
				"width":width+"px",
				"animation-duration":time+"s"
				}).appendTo($(".fu"));
				funum++;
			}else 
			clearInterval(myYear);
		},100)
		$(".fix").click(function(){
			//console.log(this);
			$(".header-year").get(0).removeChild(this);
		});
	}
</script>